package com.huixue.cn.ztej.controller;

import java.util.HashMap;
import java.util.Map;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.huixue.cn.ztej.bean.Results;
import com.huixue.cn.ztej.service.SysLoginLoggerService;
import com.huixue.cn.ztej.utils.framwork.PageParameter;

@Controller
@RequestMapping(value = "/sys/login/logger")
public class LoginLoggerController {

	@Autowired
	SysLoginLoggerService sysLoginLoggerService;
	
	
	@RequestMapping(value = "/list")
	public String listLogger(@RequestParam(value = "page", defaultValue = "1") Integer page,
			@RequestParam(value = "rows", defaultValue = PageParameter.DEFAULT_PAGE_SIZE+"") Integer rows,
			Model model) {
		
		Map<String, Object> searchParams = new HashMap<String,Object>();		
		
		Results result = sysLoginLoggerService.listLoggerPage(searchParams,page,rows);
		
		model.addAttribute("res", result);
		
		return "/logger/login/list";
	}
}
